﻿using System.Collections.Generic;

namespace dIRca.Data.Settings
{
    public class Factory
    {
        public static Client Create()
        {
            var result = new Client();
            result.ConnectOnStartup = false;
            result.ReconnectOnDisconnect = true;
            result.DefaultPort = 6667;
            result.WindowBuffer = 1000;
            result.AutoScrollOnOutput = true;

            var servers = new List<Server>();
            servers.Add(new Server()
            {
                DisplayName = "Random server",
                HostName = "irc.efnet.org",
                Ports = "6667",
                Group = "EFNet",
                AutoConnect = true,
            });
            //servers.Add(new Server()
            //{
            //    DisplayName = "Random server",
            //    HostName = "irc.freenode.net",
            //    Ports = "6667",
            //    Group = "Freenode",
            //});
            //servers.Add(new Server()
            //{
            //    DisplayName = "Random server",
            //    HostName = "irc.dal.net",
            //    Ports = "6667",
            //    Group = "DALnet",
            //});
            //servers.Add(new Server()
            //{
            //    DisplayName = "Random server",
            //    HostName = "irc.powerprecision.com",
            //    Ports = "6667",
            //    Group = "PowerPrecision",
            //});
            //servers.Add(new Server()
            //{
            //    DisplayName = "Random server",
            //    HostName = "irc",
            //    Ports = "6667",
            //    Group = "Fake",
            //});
            result.Servers = servers;

            var networks = new List<Network>();
            //networks.Add(new Network()
            //{
            //    Name = "EFNet",
            //    IsJoinEnabled = true,
            //    JoinChannels = "#wp7, #xna",
            //    JoinDelay = 2,
            //});
            //networks.Add(new Network()
            //{
            //    Name = "Freenode",
            //    IsJoinEnabled = true,
            //    JoinChannels = "#xda-devs",
            //    JoinDelay = 2,
            //});
            networks.Add(new Network()
            {
                Name = "PowerPrecision",
                IsJoinEnabled = true,
                JoinChannels = "#wp7, #xna",
                JoinDelay = 2,
            });
            result.Networks = networks;

            var nickNameAlt = new List<string>();
            result.User = new User()
            {
                Name = "WP7 IRC Client",
                Email = "dIRca@urmom.com",
                NickName = "dIRca",
                // TODO: Sync CSV and ObservableCollection
                NickNameAlternates = "dERca, dERka",
                QuitMessage = "dIRca derka muhammad jihad",
                IsIdentdEnabled = true,
                IdentdUserName = "dIRca",
            };
            return result;
        }
    }
}
